package com.skyolder.milkbee.domain;

import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import io.swagger.annotations.ApiModel;

/**
 * Leaguer 会员
 * createdAt 创建时间
 * forbidden 禁止发言
 * forbiddenDate 禁止发言截至日期
 * prevent 禁用
 * birth 生日
 * name 名称
 * nikename 昵称
 * score 积分
 * estateName 等级名称
 * estateRank 等级
 * mana 威望
 * userId 用户 ID
 * accusation 举报次数
 * gold 金币数量
 * identification 身份证
 * realName 真实姓名
 * idPicture 身份证照片
 * realPicture 真实头像
 * cardCount 发帖数
 * commentCount 跟帖数
 * avatar 头像
 * monitor 监控
 * underwrite
 */
@ApiModel(description = "Leaguer 会员 createdAt 创建时间 forbidden 禁止发言 forbiddenDate 禁止发言截至日期 prevent 禁用 birth 生日 name 名称 nikename 昵称 score 积分 estateName 等级名称 estateRank 等级 mana 威望 userId 用户 ID accusation 举报次数 gold 金币数量 identification 身份证 realName 真实姓名 idPicture 身份证照片 realPicture 真实头像 cardCount 发帖数 commentCount 跟帖数 avatar 头像")
@Entity
@Table(name = "leaguer")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Leaguer implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Column(name = "created_at")
    private ZonedDateTime createdAt;

    @Column(name = "forbidden")
    private Boolean forbidden;

    @Column(name = "forbidden_date")
    private ZonedDateTime forbiddenDate;

    @Column(name = "forbidden_message")
    private Boolean forbiddenMessage;

    @Column(name = "forbidden_square")
    private Boolean forbiddenSquare;

    @Column(name = "prevent")
    private Boolean prevent;

    @Column(name = "birth")
    private ZonedDateTime birth;

    @Column(name = "name")
    private String name;

    @Column(name = "nikename")
    private String nikename;

    @Column(name = "score")
    private Long score;

    @Column(name = "estate_id")
    private Long estateId;

    @Column(name = "estate_name")
    private String estateName;

    @Column(name = "estate_rank")
    private Long estateRank;

    @Column(name = "mana")
    private Long mana;

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "accusation")
    private Long accusation;

    @Column(name = "gold")
    private Long gold;

    @Column(name = "identification")
    private String identification;

    @Column(name = "real_name")
    private String realName;

    @Column(name = "id_picture")
    private String idPicture;

    @Column(name = "real_picture")
    private String realPicture;

    @Column(name = "card_count")
    private Long cardCount;

    @Column(name = "comment_count")
    private Long commentCount;

    @Column(name = "avatar")
    private String avatar;
    
    @Column(name = "authentication")
    private Boolean authentication;
    
    @Column(name = "monitor")
    private Boolean monitor;
    
    @Column(name = "underwrite")
    private String underwrite;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public ZonedDateTime getCreatedAt() {
        return createdAt;
    }

    public Leaguer createdAt(ZonedDateTime createdAt) {
        this.createdAt = createdAt;
        return this;
    }

    public void setCreatedAt(ZonedDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public Boolean isForbidden() {
        return forbidden;
    }

    public Leaguer forbidden(Boolean forbidden) {
        this.forbidden = forbidden;
        return this;
    }

    public void setForbidden(Boolean forbidden) {
        this.forbidden = forbidden;
    }

    public ZonedDateTime getForbiddenDate() {
        return forbiddenDate;
    }

    public Leaguer forbiddenDate(ZonedDateTime forbiddenDate) {
        this.forbiddenDate = forbiddenDate;
        return this;
    }

    public void setForbiddenDate(ZonedDateTime forbiddenDate) {
        this.forbiddenDate = forbiddenDate;
    }

    public Boolean isForbiddenMessage() {
        return forbiddenMessage;
    }

    public Leaguer forbiddenMessage(Boolean forbiddenMessage) {
        this.forbiddenMessage = forbiddenMessage;
        return this;
    }

    public void setForbiddenMessage(Boolean forbiddenMessage) {
        this.forbiddenMessage = forbiddenMessage;
    }

    public Boolean isForbiddenSquare() {
        return forbiddenSquare;
    }

    public Leaguer forbiddenSquare(Boolean forbiddenSquare) {
        this.forbiddenSquare = forbiddenSquare;
        return this;
    }

    public void setForbiddenSquare(Boolean forbiddenSquare) {
        this.forbiddenSquare = forbiddenSquare;
    }

    public Boolean isPrevent() {
        return prevent;
    }

    public Leaguer prevent(Boolean prevent) {
        this.prevent = prevent;
        return this;
    }

    public void setPrevent(Boolean prevent) {
        this.prevent = prevent;
    }

    public ZonedDateTime getBirth() {
        return birth;
    }

    public Leaguer birth(ZonedDateTime birth) {
        this.birth = birth;
        return this;
    }

    public void setBirth(ZonedDateTime birth) {
        this.birth = birth;
    }

    public String getName() {
        return name;
    }

    public Leaguer name(String name) {
        this.name = name;
        return this;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNikename() {
        return nikename;
    }

    public Leaguer nikename(String nikename) {
        this.nikename = nikename;
        return this;
    }

    public void setNikename(String nikename) {
        this.nikename = nikename;
    }

    public Long getScore() {
        return score;
    }

    public Leaguer score(Long score) {
        this.score = score;
        return this;
    }

    public void setScore(Long score) {
        this.score = score;
    }

    public Long getEstateId() {
        return estateId;
    }

    public Leaguer estateId(Long estateId) {
        this.estateId = estateId;
        return this;
    }

    public void setEstateId(Long estateId) {
        this.estateId = estateId;
    }

    public String getEstateName() {
        return estateName;
    }

    public Leaguer estateName(String estateName) {
        this.estateName = estateName;
        return this;
    }

    public void setEstateName(String estateName) {
        this.estateName = estateName;
    }

    public Long getEstateRank() {
        return estateRank;
    }

    public Leaguer estateRank(Long estateRank) {
        this.estateRank = estateRank;
        return this;
    }

    public void setEstateRank(Long estateRank) {
        this.estateRank = estateRank;
    }

    public Long getMana() {
        return mana;
    }

    public Leaguer mana(Long mana) {
        this.mana = mana;
        return this;
    }

    public void setMana(Long mana) {
        this.mana = mana;
    }

    public Long getUserId() {
        return userId;
    }

    public Leaguer userId(Long userId) {
        this.userId = userId;
        return this;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getAccusation() {
        return accusation;
    }

    public Leaguer accusation(Long accusation) {
        this.accusation = accusation;
        return this;
    }

    public void setAccusation(Long accusation) {
        this.accusation = accusation;
    }

    public Long getGold() {
        return gold;
    }

    public Leaguer gold(Long gold) {
        this.gold = gold;
        return this;
    }

    public void setGold(Long gold) {
        this.gold = gold;
    }

    public String getIdentification() {
        return identification;
    }

    public Leaguer identification(String identification) {
        this.identification = identification;
        return this;
    }

    public void setIdentification(String identification) {
        this.identification = identification;
    }

    public String getRealName() {
        return realName;
    }

    public Leaguer realName(String realName) {
        this.realName = realName;
        return this;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdPicture() {
        return idPicture;
    }

    public Leaguer idPicture(String idPicture) {
        this.idPicture = idPicture;
        return this;
    }

    public void setIdPicture(String idPicture) {
        this.idPicture = idPicture;
    }

    public String getRealPicture() {
        return realPicture;
    }

    public Leaguer realPicture(String realPicture) {
        this.realPicture = realPicture;
        return this;
    }

    public void setRealPicture(String realPicture) {
        this.realPicture = realPicture;
    }

    public Long getCardCount() {
        return cardCount;
    }

    public Leaguer cardCount(Long cardCount) {
        this.cardCount = cardCount;
        return this;
    }

    public void setCardCount(Long cardCount) {
        this.cardCount = cardCount;
    }

    public Long getCommentCount() {
        return commentCount;
    }

    public Leaguer commentCount(Long commentCount) {
        this.commentCount = commentCount;
        return this;
    }

    public void setCommentCount(Long commentCount) {
        this.commentCount = commentCount;
    }

    public String getAvatar() {
        return avatar;
    }

    public Leaguer avatar(String avatar) {
        this.avatar = avatar;
        return this;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }
    
    public Boolean isAuthentication() {
        return authentication;
    }

    public Leaguer authentication(Boolean authentication) {
        this.authentication = authentication;
        return this;
    }

    public void  setAuthentication (Boolean authentication) {
        this.authentication = authentication;
    }
    public Boolean isMonitor() {
    	return monitor;
    }
    
    public Leaguer monitor(Boolean monitor) {
    	this.monitor = monitor;
    	return this;
    }
    
    public void setMonitor(Boolean monitor) {
    	this.monitor = monitor;
    }

    
    public String getUnderwrite() {
        return underwrite;
    }

    public Leaguer underwrite(String underwrite) {
        this.underwrite = underwrite;
        return this;
    }

    public void setUnderwrite(String underwrite) {
        this.underwrite = underwrite;
    }
    
    
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Leaguer leaguer = (Leaguer) o;
        if (leaguer.id == null || id == null) {
            return false;
        }
        return Objects.equals(id, leaguer.id);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "Leaguer{" +
            "id=" + id +
            ", createdAt='" + createdAt + "'" +
            ", forbidden='" + forbidden + "'" +
            ", forbiddenDate='" + forbiddenDate + "'" +
            ", forbiddenMessage='" + forbiddenMessage + "'" +
            ", forbiddenSquare='" + forbiddenSquare + "'" +
            ", prevent='" + prevent + "'" +
            ", birth='" + birth + "'" +
            ", name='" + name + "'" +
            ", nikename='" + nikename + "'" +
            ", score='" + score + "'" +
            ", estateId='" + estateId + "'" +
            ", estateName='" + estateName + "'" +
            ", estateRank='" + estateRank + "'" +
            ", mana='" + mana + "'" +
            ", userId='" + userId + "'" +
            ", accusation='" + accusation + "'" +
            ", gold='" + gold + "'" +
            ", identification='" + identification + "'" +
            ", realName='" + realName + "'" +
            ", idPicture='" + idPicture + "'" +
            ", realPicture='" + realPicture + "'" +
            ", cardCount='" + cardCount + "'" +
            ", commentCount='" + commentCount + "'" +
            ", avatar='" + avatar + "'" +
            '}';
    }
    public static Leaguer newInstance(){
    	Leaguer leaguer=new Leaguer();
		leaguer.setAccusation(0L);
		leaguer.setAvatar("1.png");
		leaguer.setBirth(ZonedDateTime.now());
		leaguer.setCardCount(0L);
		leaguer.setCommentCount(0L);
		leaguer.setCreatedAt(ZonedDateTime.now());
		leaguer.setEstateId(1L);
		leaguer.setEstateName("");
		leaguer.setEstateRank(0L);
		leaguer.setForbidden(false);
		leaguer.setForbiddenDate(ZonedDateTime.parse( "1999-12-03T10:15:30+01:00[Europe/Paris]"));
		leaguer.setForbiddenMessage(false);
		leaguer.setForbiddenSquare(false);
		leaguer.setGold(0L);
		leaguer.setIdentification("");
		leaguer.setIdPicture(null);
		leaguer.setMana(0L);
		leaguer.setName("");
		leaguer.setNikename("");
		leaguer.setPrevent(false);
		leaguer.setRealName("");
		leaguer.setRealPicture(null);
		leaguer.setScore(0L);
		leaguer.setUserId(0L);
		leaguer.setAuthentication(false);
		leaguer.setMonitor(false);
		return leaguer;
    }
}
